-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
blueprintAssignment.json
677 lines (677 loc) · 21.2 KB
/
blueprintAssignment.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
{
"swagger": "2.0",
"info": {
"title": "BlueprintClient",
"description": "Azure Blueprints Client provides access to blueprint definitions, assignments, and artifacts, and related blueprint operations.",
"version": "2018-11-01-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}": {
"put": {
"tags": [
"Assignment"
],
"operationId": "Assignments_CreateOrUpdate",
"description": "Create or update a blueprint assignment.",
"x-ms-examples": {
"Assignment with system-assigned managed identity at subscription scope": {
"$ref": "./examples/subscriptionBPAssignment/BlueprintAssignment_Create_SystemAssignedMSI.json"
},
"Assignment with user-assigned managed identity at subscription scope": {
"$ref": "./examples/subscriptionBPAssignment/BlueprintAssignment_Create_UserAssignedMSI.json"
},
"Assignment with system-assigned managed identity at management group scope": {
"$ref": "./examples/managementGroupBPAssignment/BlueprintAssignment_Create_SystemAssignedMSI.json"
},
"Assignment with user-assigned managed identity at management group scope": {
"$ref": "./examples/managementGroupBPAssignment/BlueprintAssignment_Create_UserAssignedMSI.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ScopeParameter"
},
{
"$ref": "#/parameters/AssignmentNameParameter"
},
{
"name": "assignment",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Assignment"
},
"description": "Blueprint assignment object to save."
}
],
"responses": {
"201": {
"description": "Created -- blueprint assignment saved.",
"schema": {
"$ref": "#/definitions/Assignment"
}
},
"default": {
"description": "Blueprints error response.",
"schema": {
"$ref": "blueprintDefinition.json#/definitions/CloudError"
}
}
}
},
"get": {
"tags": [
"Assignment"
],
"operationId": "Assignments_Get",
"description": "Get a blueprint assignment.",
"x-ms-examples": {
"Assignment at subscription scope": {
"$ref": "./examples/subscriptionBPAssignment/BlueprintAssignment_Get.json"
},
"Assignment at management group scope": {
"$ref": "./examples/managementGroupBPAssignment/BlueprintAssignment_Get.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ScopeParameter"
},
{
"$ref": "#/parameters/AssignmentNameParameter"
}
],
"responses": {
"200": {
"description": "OK -- blueprint assignment retrieved.",
"schema": {
"$ref": "#/definitions/Assignment"
}
},
"default": {
"description": "Blueprints error response.",
"schema": {
"$ref": "blueprintDefinition.json#/definitions/CloudError"
}
}
}
},
"delete": {
"tags": [
"Assignment"
],
"operationId": "Assignments_Delete",
"description": "Delete a blueprint assignment.",
"x-ms-examples": {
"Assignment_Delete at subscription scope": {
"$ref": "./examples/subscriptionBPAssignment/BlueprintAssignment_Delete.json"
},
"Assignment_Delete at subscription scope, and delete the resources created by the assignment": {
"$ref": "./examples/subscriptionBPAssignment/BlueprintAssignment_Delete_AndDeleteChildren.json"
},
"Assignment_Delete at management group scope": {
"$ref": "./examples/managementGroupBPAssignment/BlueprintAssignment_Delete.json"
},
"Assignment_Delete at management group scope, and delete the resources created by the assignment": {
"$ref": "./examples/managementGroupBPAssignment/BlueprintAssignment_Delete_AndDeleteChildren.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ScopeParameter"
},
{
"$ref": "#/parameters/AssignmentNameParameter"
},
{
"name": "deleteBehavior",
"in": "query",
"required": false,
"type": "string",
"enum": [
"none",
"all"
],
"x-ms-enum": {
"name": "AssignmentDeleteBehavior",
"modelAsString": true
},
"description": "When deleteBehavior=all, the resources that were created by the blueprint assignment will be deleted."
}
],
"responses": {
"202": {
"description": "OK -- blueprint assignment deleted.",
"schema": {
"$ref": "#/definitions/Assignment"
}
},
"204": {
"description": "No Content"
},
"default": {
"description": "Blueprints error response.",
"schema": {
"$ref": "blueprintDefinition.json#/definitions/CloudError"
}
}
}
}
},
"/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/whoIsBlueprint": {
"post": {
"operationId": "Assignments_WhoIsBlueprint",
"description": "Get Blueprints service SPN objectId",
"x-ms-examples": {
"WhoIsBlueprint_Action at subscription scope": {
"$ref": "./examples/subscriptionBPAssignment/WhoIsBlueprint_Action.json"
},
"WhoIsBlueprint_Action at management group scope": {
"$ref": "./examples/managementGroupBPAssignment/WhoIsBlueprint_Action.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ScopeParameter"
},
{
"$ref": "#/parameters/AssignmentNameParameter"
}
],
"responses": {
"200": {
"description": "Blueprints service SPN objectId",
"schema": {
"$ref": "#/definitions/WhoIsBlueprintContract"
}
},
"default": {
"description": "Blueprints error response.",
"schema": {
"$ref": "blueprintDefinition.json#/definitions/CloudError"
}
}
}
}
},
"/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments": {
"get": {
"tags": [
"Assignment"
],
"operationId": "Assignments_List",
"description": "List blueprint assignments within a subscription or a management group.",
"x-ms-examples": {
"Assignment at subscription scope": {
"$ref": "./examples/subscriptionBPAssignment/BlueprintAssignment_List.json"
},
"Assignment at management group scope": {
"$ref": "./examples/managementGroupBPAssignment/BlueprintAssignment_List.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/ScopeParameter"
}
],
"responses": {
"200": {
"description": "OK -- all blueprint assignments retrieved.",
"schema": {
"$ref": "#/definitions/AssignmentList"
}
},
"default": {
"description": "Blueprints error response.",
"schema": {
"$ref": "blueprintDefinition.json#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
}
},
"definitions": {
"Assignment": {
"type": "object",
"description": "Represents a blueprint assignment.",
"properties": {
"identity": {
"description": "Managed identity for this blueprint assignment.",
"$ref": "#/definitions/ManagedServiceIdentity"
},
"properties": {
"description": "Properties for blueprint assignment object.",
"x-ms-client-flatten": true,
"$ref": "#/definitions/AssignmentProperties"
}
},
"required": [
"identity",
"properties"
],
"allOf": [
{
"$ref": "#/definitions/TrackedResource"
}
]
},
"AssignmentList": {
"type": "object",
"description": "List of blueprint assignments",
"properties": {
"value": {
"type": "array",
"description": "List of blueprint assignments.",
"items": {
"$ref": "#/definitions/Assignment"
}
},
"nextLink": {
"type": "string",
"readOnly": true,
"description": "Link to the next page of results."
}
}
},
"UserAssignedIdentity": {
"type": "object",
"description": "User-assigned managed identity.",
"properties": {
"principalId": {
"type": "string",
"description": "Azure Active Directory principal ID associated with this Identity."
},
"clientId": {
"type": "string",
"description": "Client App Id associated with this identity."
}
}
},
"ManagedServiceIdentity": {
"type": "object",
"description": "Managed identity generic object.",
"properties": {
"type": {
"type": "string",
"description": "Type of the managed identity.",
"enum": [
"None",
"SystemAssigned",
"UserAssigned"
],
"x-ms-enum": {
"name": "ManagedServiceIdentityType",
"modelAsString": true
}
},
"principalId": {
"type": "string",
"description": "Azure Active Directory principal ID associated with this Identity."
},
"tenantId": {
"type": "string",
"description": "ID of the Azure Active Directory."
},
"userAssignedIdentities": {
"type": "object",
"description": "The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.",
"additionalProperties": {
"description": "User-assigned managed identity.",
"$ref": "#/definitions/UserAssignedIdentity"
}
}
},
"required": [
"type"
]
},
"AssignmentStatus": {
"description": "The status of a blueprint assignment. This field is readonly.",
"type": "object",
"properties": {
"managedResources": {
"type": "array",
"description": "List of resources that were created by the blueprint assignment.",
"readOnly": true,
"items": {
"type": "string"
}
}
},
"allOf": [
{
"$ref": "#/definitions/BlueprintResourceStatusBase"
}
]
},
"AssignmentLockSettings": {
"description": "Defines how resources deployed by a blueprint assignment are locked.",
"type": "object",
"properties": {
"mode": {
"type": "string",
"description": "Lock mode.",
"enum": [
"None",
"AllResourcesReadOnly",
"AllResourcesDoNotDelete"
],
"x-ms-enum": {
"name": "AssignmentLockMode",
"modelAsString": true
}
},
"excludedPrincipals": {
"type": "array",
"description": "List of AAD principals excluded from blueprint locks. Up to 5 principals are permitted.",
"items": {
"type": "string"
}
},
"excludedActions": {
"type": "array",
"description": "List of management operations that are excluded from blueprint locks. Up to 200 actions are permitted. If the lock mode is set to 'AllResourcesReadOnly', then the following actions are automatically appended to 'excludedActions': '*/read', 'Microsoft.Network/virtualNetworks/subnets/join/action' and 'Microsoft.Authorization/locks/delete'. If the lock mode is set to 'AllResourcesDoNotDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will get removed.",
"items": {
"type": "string"
}
}
}
},
"AssignmentProperties": {
"type": "object",
"description": "Detailed properties for a blueprint assignment.",
"properties": {
"blueprintId": {
"type": "string",
"description": "ID of the published version of a blueprint definition."
},
"scope": {
"type": "string",
"description": "The target subscription scope of the blueprint assignment (format: '/subscriptions/{subscriptionId}'). For management group level assignments, the property is required."
},
"parameters": {
"type": "object",
"description": "Blueprint assignment parameter values.",
"additionalProperties": {
"description": "Key/Value pair of parameter fulfillment.",
"$ref": "#/definitions/ParameterValue"
}
},
"resourceGroups": {
"description": "Names and locations of resource group placeholders.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ResourceGroupValue"
}
},
"status": {
"description": "Status of blueprint assignment. This field is readonly.",
"readOnly": true,
"$ref": "#/definitions/AssignmentStatus"
},
"locks": {
"description": "Defines how resources deployed by a blueprint assignment are locked.",
"$ref": "#/definitions/AssignmentLockSettings"
},
"provisioningState": {
"type": "string",
"readOnly": true,
"description": "State of the blueprint assignment.",
"enum": [
"creating",
"validating",
"waiting",
"deploying",
"cancelling",
"locking",
"succeeded",
"failed",
"canceled",
"deleting"
],
"x-ms-enum": {
"name": "AssignmentProvisioningState",
"modelAsString": true
}
}
},
"allOf": [
{
"$ref": "#/definitions/BlueprintResourcePropertiesBase"
}
],
"required": [
"parameters",
"resourceGroups"
]
},
"ParameterValue": {
"description": "Value for the specified parameter. Can be either 'value' or 'reference' but not both.",
"type": "object",
"properties": {
"value": {
"type": "object",
"description": "Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans."
},
"reference": {
"type": "object",
"description": "Parameter value as reference type.",
"$ref": "#/definitions/SecretValueReference"
}
}
},
"SecretValueReference": {
"description": "Reference to a Key Vault secret.",
"type": "object",
"properties": {
"keyVault": {
"description": "Specifies the reference to a given Azure Key Vault.",
"$ref": "#/definitions/keyVaultReference"
},
"secretName": {
"description": "Name of the secret.",
"type": "string"
},
"secretVersion": {
"description": "The version of the secret to use. If left blank, the latest version of the secret is used.",
"type": "string"
}
},
"required": [
"keyVault",
"secretName"
]
},
"keyVaultReference": {
"description": "Specifies the link to a Key Vault.",
"type": "object",
"properties": {
"id": {
"description": "Azure resource ID of the Key Vault.",
"type": "string"
}
},
"required": [
"id"
]
},
"ResourceGroupValue": {
"description": "Represents an Azure resource group.",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the resource group.",
"minLength": 1,
"maxLength": 90
},
"location": {
"type": "string",
"description": "Location of the resource group."
}
}
},
"TrackedResource": {
"description": "Common properties for all Azure tracked resources.",
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The location of this blueprint assignment.",
"x-ms-mutability": [
"read",
"create"
]
}
},
"required": [
"location"
],
"allOf": [
{
"$ref": "#/definitions/AzureResourceBase"
}
]
},
"AzureResourceBase": {
"description": "Common properties for all Azure resources.",
"type": "object",
"x-ms-azure-resource": true,
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "String Id used to locate any resource on Azure."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Type of this resource."
},
"name": {
"readOnly": true,
"type": "string",
"description": "Name of this resource."
}
}
},
"BlueprintResourcePropertiesBase": {
"description": "Shared properties between all blueprint resources.",
"type": "object",
"x-ms-external": true,
"properties": {
"displayName": {
"type": "string",
"description": "One-liner string explain this resource.",
"maxLength": 256
},
"description": {
"type": "string",
"description": "Multi-line explain this resource.",
"maxLength": 500
}
}
},
"BlueprintResourceStatusBase": {
"description": "Shared status properties between all blueprint resources.",
"type": "object",
"properties": {
"timeCreated": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "Creation time of this blueprint definition."
},
"lastModified": {
"type": "string",
"format": "date-time",
"readOnly": true,
"description": "Last modified time of this blueprint definition."
}
}
},
"WhoIsBlueprintContract": {
"description": "Response schema for querying the Azure Blueprints service principal in the tenant.",
"properties": {
"objectId": {
"type": "string",
"description": "AAD object Id of the Azure Blueprints service principal in the tenant."
}
}
}
},
"parameters": {
"ScopeParameter": {
"name": "resourceScope",
"in": "path",
"required": true,
"type": "string",
"description": "The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').",
"x-ms-parameter-location": "method",
"x-ms-skip-url-encoding": true
},
"AssignmentNameParameter": {
"name": "assignmentName",
"in": "path",
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"description": "Name of the blueprint assignment."
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"x-ms-parameter-location": "client",
"description": "Client API Version."
}
}
}